<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生信息管理系统</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="shortcut icon" href="../static/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="../static/static/css/font.css">
    <link rel="stylesheet" href="../static/static/css/weadmin.css">
    <script src="../static/lib/layui/layui.js" charset="utf-8"></script>
</head>
<body>
<ul class="layui-nav layui-bg-green">
    <li class="layui-nav-item "><a href="/addStudnet">添加学生</a></li>
    <li class="layui-nav-item layui-this"><a href="/addLesson">添加课程</a></li>
    <li class="layui-nav-item "><a href="/addTeacher">添加教师</a></li>
    <li class="layui-nav-item "><a href="/outSys">退出登录</a></li>
</ul>
<br>
<div class="login">
    <form method="post" class="layui-form">
        <span><h1 style="color: red ">{{ msg }}</h1></span>
        <h1>*******添加课程信息********</h1>
        <br>
        <input name="name" placeholder="课程名称" type="text" lay-verify="required" class="layui-input">
        <hr class="hr15">
        <input name="credit" placeholder="学分" type="text" lay-verify="required" class="layui-input">
        <hr class="hr15">
        <input name="time" placeholder="课时" type="text" lay-verify="required" class="layui-input">
        <hr class="hr15">

        <input class="loginin" value="提交" onclick="success()" lay-submit lay-filter="addStudnet" style="width:100%;" type="submit">
        <hr class="hr20">

    </form>
</div>
<script src="../static/lib/layui/layui.js" charset="utf-8"></script>
<script>

    layui.use(['form', 'admin'], function () {
        var form = layui.form


        form.on('submit(login)', function (data) {
            $.ajax({
                    url: '/addLesson',
                    method: 'post',
                    data: data.field,
                    dataType: 'JSON',
                }
            );
            return false;
        });


    });


</script>
</body>
</html>